package DAO;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Conexao {
	
	private static Connection conexao;
	
	public static Connection getConexao(){
		//if (conexao == null){
			conecta();
		//}
		
		return conexao;
	}
	
	public static void conecta(){
		
		try {
			conexao = 
					DriverManager.getConnection("jdbc:sqlserver://localhost:1433;databaseName=BD_TRM;user=sa;password=admin;");
		} catch (SQLException e) {
			System.out.println("Erro de Conexão: ");
			e.printStackTrace();
		}
		
	}
	
}
